<script language="JavaScript">	
 //Nota: Los submenus son invisibles por defecto   
    
var itemOrig, colorTextMenu;

function despMenu_mr(nombre,sn){
	obj = eval(document.getElementById(nombre));
	if(!obj) return;
	if (sn>0){
		obj.style.visibility = "visible";
	}else{
		obj.style.visibility = "hidden";
	}
	ajustarFrame(sn);
}
function destacar_mr(obj, val){
	if (val==1){
		itemOrig = obj.style.backgroundColor;
	
		obj.style.backgroundColor="#666699";
		obj.style.color="#FFFFFF";
	}else{
		obj.style.backgroundColor= itemOrig;
		obj.style.color="#000000";
	}
}
function cerrar_mr(nombre){
	document.getElementById(nombre).style.visibility = "hidden";
	obj = eval(window.parent.arriba.titMenuRep);
	if(obj) obj.style.visibility = "hidden";
}

//Llama al boton "cmdmenu" de menu.jsp y le hace click. 
//Le pasa la variable "index" al botón través de su atributo "title"
/*
function menu_mr(index){
	obj = eval(window.parent.arriba.cmdmenu);
	if(obj){
		obj.title = index; 
		obj.click();
	}	
}
*/
function menu_mr(p){
        //alert("menu_mr");
	obj = eval(window.parent.arriba.cmdmenu);
        //var p = document.getElementById("m101");
        var id_submenu = p.id;        
        var titulo_menu = p.firstChild.nodeValue;        
	if(obj){
		obj.title = id_submenu; 
                obj.value = titulo_menu;                
		obj.click();
                //alert("xxx");
        }        
}

function topPage_mr(){
	if(window.pageYOffset){
		return window.pageYOffset;
	 }
	 else {
		return Math.max(document.body.scrollTop, document.documentElement.scrollTop);
	 }
}
function fijar_mr(){
	posic = 0;
	dObj = eval(document.getElementById('cabecera'));
	if(dObj) dObj.style.posTop = topPage_mr() + posic; 
}

function desplegar_mr(indice){
	tamFila_mr = 20; canFilas = 0;
	imas_mr = "../../images/imas.gif";
	imenos_mr = "../../images/imenos.gif";
	switch(indice){
		case 1:
			canFilas = 7;
			break;
		case 2:
			canFilas = 10;
			break;
		case 3:
			canFilas = 9;
			break;
		case 4:
			canFilas = 7;
			break;
		case 5:
			canFilas = 2;
			break;
		default:
	}
	if(eval(document.getElementById("seg" + indice).style.pixelHeight) == 0){
		document.getElementById("seg" + indice).style.pixelHeight = canFilas * tamFila_mr;
		document.getElementById("img" + indice).src = imenos_mr;
	}else{
		document.getElementById("seg" + indice).style.pixelHeight = 0;
		document.getElementById("img" + indice).src = imas_mr;
	}
}

function ajustarFrame(sn){
	objFrame = window.parent.document.getElementsByTagName("frameset");
	if(sn==1){
		//objFrame[0].rows = "78,0,*";
	}else{
		//objFrame[0].rows = window.parent.arriba.document.getElementById("hdnTamFrame").value;
	}
}

function mionload() {
    var div = document.getElementById("Mjs1");
    //div.style.display = 'block';
    div.style.display = 'none';
}

</script>
<style type="text/css">
.itMenu_tmp { position: absolute; clip: rect( ); color:#FFFFFF; background:#FFFFFF; border-color:#999999; visibility:hidden; cursor:pointer; }
.itMenuDes_tmp { background-color:#EFEFEF; color:#000000; cursor:pointer }
.link_mr_tmp { cursor:pointer; color:#993300 }
.itMenu_cab_tmp { background-color:#CCCCCC; font-size:7pt }
</style>

<body onload="mionload()">

    
<!--*************************************************************************-->    
<!--OPCIONES DEL SUBMENU-->
<% String pagina = (String) request.getAttribute("pageOpciones"); %>
<jsp:include page="<%=pagina%>" flush="true" />   
<!--*************************************************************************-->

    
<div id="Mjs1" style="width:220px; height:40px; z-index:21; left: 480px; top: 71px; visibility:visible; 
					  position: absolute; clip: rect( ); color:#666600; background:#FFFF99; 
					  border-style:solid; border-width:1px; font-weight:bold; 
			 		  font-family: Arial, Helvetica, sans-serif; font-size:8pt; text-align:center">
	<table border="0">
		<tr>
			<td valign="top"><img src="../../images/wait_ax.gif" border="0" /></td>
                        <td valign="middle">&nbsp;Cargando Submen&uacute;es, espere por favor...&nbsp;</td>
		</tr></table>
</div> 


<script language="javascript">
wLeft  = (screen.availWidth / 2) - (document.getElementById("Mjs1").style.pixelWidth / 2);
wTop = (screen.availHeight / 2) - (document.getElementById("Mjs1").style.pixelHeight / 2);
document.getElementById("Mjs1").style.pixelLeft = wLeft;
document.getElementById("Mjs1").style.pixelTop = wTop - 78 - 150;
</script>

</body>